package utils

import "github.com/labstack/echo/v4"

func GetUserId(ctx echo.Context) int {
	var (
		userId int
		exist  bool
	)
	if userId, exist = ctx.Get("userID").(int); exist {
		return userId
	}
	return 0
}

func GetLoverId(ctx echo.Context) int {
	var (
		loverId int
		exist   bool
	)
	if loverId, exist = ctx.Get("loverId").(int); exist {
		return loverId
	}
	return 0
}
